<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // function fn() {
        //     for(var i = 0 ; i < arguments.length ; i++){
        //         console.log(arguments[i]);
        //     }
        // }
        // fn(1, 2, 3, 4, 5, 6)

        
        /* 剩余参数 */
        // function fn(a,b,...rest) {
        //     console.log(rest);
        // }
        // fn(1, 2, 3, 4, 5, 6)
        

        /* 参数默认值 */
        function fn(a = 10,b = 20){
            console.log(a,b);
        }
        fn(1,2);
    </script>
</body>

</html>